﻿using System;
using AgileBoard.Domain;

namespace AgileBoard.Dtos.Mappers
{
    public class ProjectDTOMapper : BaseDTOMapper
    {
        public static ProjectDTO MapToDTO(Project model)
        {
            var dto = new ProjectDTO();
            dto.ID = model.ID;
            dto.Name = model.Name;
            return dto;
        }

        public static Project MapFromDTO(ProjectDTO dto)
        {
            var project = new Project();
            project.ID = dto.ID;
            project.Name = dto.Name;
            project.CreateTime = DateTime.Now;
            return project;
        }
    }
}